<?php


namespace App\Controller;



use App\Event\UserRegistered;
use Psr\EventDispatcher\EventDispatcherInterface;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\AutoController;
/**
 * @AutoController()
 * Class ListController
 * @package App\Controller
 */
class ListController
{


    /**
     * @Inject()
     * @var EventDispatcherInterface
     */
    private $eventDispatcher;

    public function userListener()
    {
        $result = 1;
        $this->eventDispatcher->dispatch(new UserRegistered($result));
        return $result;
    }


}